home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / smail-3.1.28 / src / transports / smtplib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-07-11  |  1.2 KB  |  41 lines

  1. /* @(#)src/transports/smtplib.h    1.3 7/11/92 11:51:43 */
  2.  
  3. /*
  4.  *    Copyright (C) 1987, 1988 by Ronald S. Karr and Landon Curt Noll
  5.  *    Copyright (C) 1992  Ronald S. Karr
  6.  *
  7.  * See the file COPYING, distributed with smail, for restriction
  8.  * and warranty information.
  9.  */
  10.  
  11. /*
  12.  * smtplib.h:
  13.  *    interface file for routines in smtplib.c.
  14.  */
  15.  
  16. /* values returned by functions in smtplib.c */
  17. #define SMTP_SUCCEED    0
  18. #define SMTP_FAIL    (-1)
  19. #define SMTP_AGAIN    (-2)
  20.  
  21. /*
  22.  * the following structure is passed around between SMTP functions and
  23.  * should be initialized as necessary to describe the SMTP connection
  24.  * characteristics.
  25.  *
  26.  * NOTE:  If "in" is set to NULL, then we will be producing batch SMTP.
  27.  */
  28. struct smtp {
  29.     FILE *in;                /* input channel from remote server */
  30.     FILE *out;                /* output channel to remote server */
  31.     unsigned short_timeout;        /* timeout period for short commands */
  32.     unsigned long_timeout;        /* normal SMTP read timeout period */
  33.     char *nl;                /* line terminator string */
  34.     struct transport *tp;        /* associated transport */
  35. };
  36.  
  37. /* functions defined in smtplib.c */
  38. extern int smtp_startup();
  39. extern int smtp_send();
  40. extern void smtp_shutdown();
  41.